Running Multiple Non-Interactive SSH Commands from Command Line

You can configure the device with multiple, non-interactive SSH (CLI) commands from a command-line connection, instead of using a terminal emulator program (e.g., PuTTY). Unlike terminal emulator programs, the command line has no user prompts and is similar to Unix SSH. This feature may be useful, for example, if you want to run a batch of SSH commands via automated connections.

As an SSH client, you can run the command-line connection tool (e.g., PuTTY Link or Plink) from a computer's command prompt. For computers running Windows, this can be done using the Command Prompt command-line app. When you enter a command, it's executed on the device instead of through a login shell.

You can enter multiple commands on the single command line, including standalone commands and command sequences. Separate each command with a semicolon (;).

The command-line syntax depends on the command-line connection tool that you are using to connect to the device. The following are examples using the Plink command-line connection tool:

To display network interfaces and CPU status (i.e., show commands):
C:\projects\tftp>plink.exe -no-antispoof -ssh 10.4.30.11 -l Admin -pwd Admin "sh run ne int; sh sys util"
To configure the syslog server's IP address:
C:\projects\tftp>plink.exe -no-antispoof -ssh 10.4.30.11 -l Admin -pwd Admin "conf tr; sys; syslog-ip 10.4.2.11; act"
To configure commands that are located in two different CLI paths:
C:\projects\tftp>plink.exe -no-antispoof -ssh 10.4.30.11 -l Admin -pwd Admin "conf voip; sip-definition settings; 100-to-18x-timeout 100; exit; exit; show system utilization"
This feature is applicable only to non-interactive commands.
This feature is not supported for async commands (e.g., ping).
You can enter up to 8,000 characters on the command line (input).
When using the command line, no other SSH connections (sessions) can be established with the device.
The device's Activity Log (see Reporting Management User Activities) also logs the commands executed from the command line (which are indicated in syslog as "Activity Log: Executing multiple CLI commands").